:root {
    --navy: #0a2a52;
    --navy-dark: #072244;
    --navy-btn: #0d3260;
    --gold: #f2b01e;
    --text: #1d2f4a;
    --muted: #5d6f88;
    --border: #d5deea;
    --bg-light: #f4f8fc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.site-header, .site-footer { flex-shrink: 0; }
a { text-decoration: none; color: inherit; }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy-dark);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 48px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 94px; height: 94px; object-fit: contain; }
.brand-logo-wide { width: 100px; height: 80px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: 3px; font-size: 17px; line-height: 1.25; }
.brand-text strong { font-weight: 600; font-size: 18px; }
.brand-text em { font-style: normal; color: var(--gold); font-size: 14px; }
.brand-cge {
    border-left: 1px solid rgba(255,255,255,.3);
    padding-left: 32px;
    margin-left: 4px;
}
.brand-cge .brand-text { font-size: 15px; }
.back-link { margin-left: auto; font-size: 15px; opacity: .95; }
.back-link:hover { color: var(--gold); }
.back-link i { margin-right: 6px; }

/* ---------- Layout ---------- */
.auth-layout { flex: 1 0 auto; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 640px; }

/* ---------- Hero (left) ---------- */
.hero {
    position: relative;
    color: #fff;
    padding: 130px 54px 40px;
    background:
        linear-gradient(90deg, rgba(7,34,68,.88) 0%, rgba(7,34,68,.45) 55%, rgba(7,34,68,.2) 100%),
        url('../images/login.jpg') center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.welcome { font-weight: 400; font-size: 34px; }
.portal-title { font-size: 72px; font-weight: 800; line-height: 1.05; margin: 4px 0 20px; }
.hero-sub { font-size: 21px; font-weight: 600; line-height: 1.4; }
.gold-line { display: block; width: 62px; height: 4px; background: var(--gold); margin: 26px 0; }
.hero-desc { max-width: 340px; font-size: 17px; line-height: 1.5; }

.hero-roles { display: flex; margin-top: 60px; position: relative; z-index: 2; }
.hero-role { padding: 0 28px; border-left: 1px solid rgba(255,255,255,.3); max-width: 240px; }
.hero-role:first-child { padding-left: 0; border-left: 0; }
.role-ring {
    width: 58px; height: 58px; border: 2px solid var(--gold); border-radius: 50%;
    display: grid; place-items: center; color: var(--gold); font-size: 22px; margin-bottom: 14px;
}
.hero-role h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.hero-role p { font-size: 15px; opacity: .9; line-height: 1.4; }
.gold-wave { position: absolute; left: 0; bottom: 0; width: 100%; height: 120px; z-index: 1; }

/* ---------- Auth side (right) ---------- */
.auth-side {
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.auth-card {
    background: #fff;
    width: 100%;
    max-width: 540px;
    border-radius: 8px;
    padding: 36px 32px;
    box-shadow: 0 8px 30px rgba(10,42,82,.1);
}
.auth-icon {
    width: 50px; height: 50px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 18px;
}
.auth-card h2 { text-align: center; font-size: 29px; font-weight: 700; color: var(--navy); }
.auth-sub { text-align: center; color: var(--muted); margin: 8px 0 26px; font-size: 15px; }

/* ---------- Form ---------- */
.input-group {
    position: relative;
    margin-bottom: 16px;
}
.input-group > i:first-child {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #7b8ca5;
}
.input-group input, .input-group select {
    width: 100%; height: 48px; padding: 0 44px 0 52px;
    border: 1px solid var(--border); border-radius: 4px;
    background: var(--bg-light); font: inherit; font-size: 15px; color: var(--text);
}
.input-group input:focus, .input-group select:focus {
    outline: 2px solid var(--navy-btn); outline-offset: 1px; background: #fff;
}
.toggle-pass {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: var(--navy); cursor: pointer; padding: 8px; font-size: 15px;
}
.form-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 14px; }
.form-row a, .switch-link a { color: #1b58b8; }
.form-row a:hover, .switch-link a:hover { text-decoration: underline; }
.check { display: flex; align-items: center; gap: 8px; color: var(--navy); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }

.btn-primary {
    width: 100%; height: 50px; border: 0; border-radius: 4px; cursor: pointer;
    background: var(--navy-btn); color: #fff; font: inherit; font-size: 17px; font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: background .2s;
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.switch-link { text-align: center; font-size: 14px; color: var(--muted); margin-top: 16px; }
.note { text-align: center; font-size: 14px; color: var(--muted); }

.alert { padding: 12px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.alert-error { background: #fdecec; color: #a32020; border: 1px solid #f3c1c1; }
.alert-success { background: #e8f6ee; color: #1b6b3a; border: 1px solid #b9e2c9; }

.divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; color: var(--muted); font-size: 13.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card {
    border: 1px solid var(--border); border-radius: 4px; padding: 16px 10px; text-align: center;
}
.role-card i { font-size: 22px; color: var(--navy); margin-bottom: 10px; }
.role-card h5 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.role-card p { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-dark); color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 18px 48px; border-top: 1px solid rgba(255,255,255,.12); flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; }
.footer-brand strong { display: block; font-weight: 500; font-size: 15px; }
.footer-brand small { font-size: 12px; opacity: .9; }
.footer-links { display: flex; font-size: 13px; }
.footer-links a { padding: 0 18px; border-left: 1px solid rgba(255,255,255,.35); }
.footer-links a:first-child { border-left: 0; }
.footer-links a:hover { color: var(--gold); }
.footer-tagline { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 14px; opacity: .9; }
.footer-social { display: flex; gap: 14px; font-size: 20px; }
.footer-social a:hover { color: var(--gold); }

/* ---------- Selectable role cards (paste at the end of style.css) ---------- */
.role-cards { margin-bottom: 22px; }

.role-card {
    position: relative;
    display: block;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.role-card:hover { border-color: var(--navy-btn); }

/* hide the real radio but keep it keyboard accessible */
.role-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* small tick badge, only visible when selected */
.role-check {
    position: absolute;
    top: 6px; right: 6px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--navy-btn);
    color: #fff;
    font-size: 11px;
    display: none;
    place-items: center;
}

.role-card:has(.role-radio:checked) {
    border-color: var(--navy-btn);
    background: var(--bg-light);
    box-shadow: 0 0 0 2px var(--navy-btn);
}
.role-card:has(.role-radio:checked) .role-check { display: grid; }
.role-card:has(.role-radio:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .auth-layout { grid-template-columns: 1fr; }
    .hero { padding: 60px 32px 100px; }
    .portal-title { font-size: 54px; }
    .hero-roles { flex-wrap: wrap; row-gap: 24px; }
}
@media (max-width: 720px) {
    .site-header { padding: 12px 20px; flex-wrap: wrap; gap: 12px; }
    .brand-cge { display: none; }
    .brand-logo { width: 64px; height: 64px; }
    .auth-side { padding: 24px 16px; }
    .role-cards { grid-template-columns: 1fr; }
    .site-footer { padding: 18px 20px; justify-content: center; text-align: center; }
}